package com.wyg.blog.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wyg.blog.model.user.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {

    User getUserByName(String username);

    IPage<User> getUsers(Page<?> page);

    Integer getUserNum(String username);

    boolean addUser(User user);

    boolean updatePwd(@Param("username") String username, @Param("password") String password);

    boolean activateUser(String username);

    boolean deleteUser(String username);
}
